#include "myview.h"
#include "drawing.h"

myview::myview(QWidget *parent)

{
    // 创建绘图场景（白板）
    scene = new DrawingScene(parent);
    scene->setSceneRect(0, 0, 800, 600);

    // 创建绘图视图，使场景可视化
    view = new QGraphicsView(scene, parent);
    view->setRenderHint(QPainter::Antialiasing);
    view->setFocusPolicy(Qt::StrongFocus);


    mainLayout = new QVBoxLayout();
    mainLayout->addWidget(view);
}

